package schoolWork.work02;

public class CarDemo {
    public static void main(String[] args) {

        Car myCar = new Car(7);
        System.out.println("油箱中的油量是:"+myCar.gasGasInTank());

        myCar.addGas(30);
        System.out.println("油箱中的油量是:"+myCar.gasGasInTank());

        myCar.drive(100);
        double gasLeft = myCar.gasGasInTank();
        System.out.println("油箱中的油量是:"+gasLeft);
    }
}
